/*
 * @Author: bug?? 184179023@.com
 * @Date: 2025-04-15 08:37:42
 * @LastEditors: bug?? 184179023@.com
 * @LastEditTime: 2025-04-15 08:47:53
 * @FilePath: \ABS.OA\miniprogram\config\projects.js
 * @Description: ??????,???`customMade`, ??koroFileHeader???? ????: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
/**
 * Notes: ???????
 * Date: 2025-04-11
 */

const projectSetting = require('./projects_config.js');

module.exports = {
  // 默认项目设置为PLM
  DEFAULT_PROJECT: 'plm',
  
  // ?????ID - ??cloudfunctions/mcloud/config/config.js??ID
  CLOUD_ID: 'abitions-6gmak8fr92c59b33',
  
  // 应用全局配置
  PROJECT_TITLE: 'ABS办公系统',
  PROJECT_VER: 'build 2025.04.12',
  PROJECT_LOGO: '/projects/oa/images/app/logo.png',
  PROJECT_DESC: 'ABS企业级办公协同系统',
  PROJECT_COPYRIGHT: 'Copyright © 2022-2025 ABS Tech',
  PROJECT_COMPANY: 'ABS',
  
  // MobX状态管理配置
  STORE_CONFIG: {
    // 缓存时间配置（秒）
    CACHE_TIME: {
      DEFAULT: 30 * 60,      // 默认30分钟
      USER: 7 * 24 * 60 * 60,// 用户信息7天
      SETTING: 30 * 24 * 60 * 60, // 设置30天
      PROJECT: 60 * 60,      // 项目信息1小时
      TASK: 10 * 60,         // 任务10分钟
      FLOW: 5 * 60,          // 审批流程5分钟
      MESSAGE: 5 * 60        // 消息5分钟
    },
    
    // 模块配置
    MODULES: {
      // 模块名称映射
      NAMES: {
        USER: '用户',
        MESSAGE: '消息',
        PROJECT: '项目',
        TASK: '任务',
        FLOW: '审批',
        KNOWLEDGE: '知识',
        TOOL: '工具'
      },
      
      // 模块状态刷新间隔（秒）
      REFRESH_INTERVAL: {
        MESSAGE: 60,     // 消息每1分钟
        TASK: 300,       // 任务每5分钟
        PROJECT: 600,    // 项目每10分钟
        FLOW: 300        // 审批每5分钟
      }
    }
  },
  
  // Day.js配置
  DAYJS_CONFIG: {
    // 默认日期格式
    DEFAULT_FORMAT: 'YYYY-MM-DD HH:mm:ss',
    DATE_FORMAT: 'YYYY-MM-DD',
    TIME_FORMAT: 'HH:mm:ss',
    
    // 自定义格式
    FORMATS: {
      FULL_CN: 'YYYY年MM月DD日 HH:mm:ss',
      DATE_CN: 'YYYY年MM月DD日',
      MONTH_CN: 'YYYY年MM月',
      TIME_ONLY: 'HH:mm',
      CALENDAR: 'M月D日'
    }
  },
  
  // #### ????? ####
  // oa????
  oa: {
    name: '????',
    color: '#0066cc',
    icon: '/images/icons/oa.png',
    tabBar: [
      {
        pagePath: "projects/oa/pages/default/index/default_index",
        text: "???",
        iconPath: "/projects/oa/images/tabbar/home.png",
        selectedIconPath: "/projects/oa/images/tabbar/home_cur.png"
      },
      {
        pagePath: "projects/oa/pages/crm/index/crm_index",
        text: "CRM",
        iconPath: "/projects/oa/images/tabbar/crm.png",
        selectedIconPath: "/projects/oa/images/tabbar/crm_cur.png"
      },
      {
        pagePath: "projects/plm/pages/project/list/project_list",
        text: "??",
        iconPath: "/projects/oa/images/tabbar/project.png",
        selectedIconPath: "/projects/oa/images/tabbar/project_cur.png"
      },
      {
        pagePath: "projects/oa/pages/task/index/task_index",
        text: "??",
        iconPath: "/projects/oa/images/tabbar/task.png",
        selectedIconPath: "/projects/oa/images/tabbar/task_cur.png"
      },
      {
        pagePath: "projects/oa/pages/my/index/my_index",
        text: "??",
        iconPath: "/projects/oa/images/tabbar/my.png",
        selectedIconPath: "/projects/oa/images/tabbar/my_cur.png"
      }
    ],
    
    // #### ???????? 
    VER: 'build 2025.04.11',
    COMPANY: 'ABS',
    
    // ????
    SETUP_SHARE_TITLE: 'ABS????',
    
    // ??????
    IMG_UPLOAD_SIZE: 10, // ??????M?  
    
    // ????
    CACHE_IS_LIST: true, // ??????
    CACHE_LIST_TIME: 60 * 30, // ???????
  
    // ????
    PROJECT_COLOR: projectSetting.PROJECT_COLOR,
    NAV_COLOR: projectSetting.NAV_COLOR,
    NAV_BG: projectSetting.NAV_BG,
    
    // ????
    USER_REG_CHECK: projectSetting.USER_REG_CHECK || false,
    USER_FIELDS: projectSetting.USER_FIELDS || [],
    
    // ???????
    NEWS_NAME: projectSetting.NEWS_NAME || '????',
    NEWS_CATE: projectSetting.NEWS_CATE || [],
    
    // ????
    SETUP_CONTENT_ITEMS: projectSetting.SETUP_CONTENT_ITEMS || [],
    
    // ??????
    FLOW_NAME: projectSetting.FLOW_NAME || '??',
    FLOW_ALL_STEPS: projectSetting.FLOW_ALL_STEPS || [],
    
    // ????
    DEPT_OPTIONS: projectSetting.DEPT_OPTIONS || []
  },
  
  // CRM????(??)
  crm: {
    name: '??????',
    color: '#19be6b',
    icon: '/images/icons/crm.png',
    tabBar: [
      {
        pagePath: "projects/crm/pages/default/index/default_index",
        text: "???",
        iconPath: "/projects/crm/images/tabbar/home.png",
        selectedIconPath: "/projects/crm/images/tabbar/home_cur.png"
      },
      {
        pagePath: "projects/crm/pages/customer/index/customer_index",
        text: "??",
        iconPath: "/projects/crm/images/tabbar/customer.png",
        selectedIconPath: "/projects/crm/images/tabbar/customer_cur.png"
      },
      {
        pagePath: "projects/crm/pages/contact/index/contact_index",
        text: "???",
        iconPath: "/projects/crm/images/tabbar/contact.png",
        selectedIconPath: "/projects/crm/images/tabbar/contact_cur.png"
      },
      {
        pagePath: "projects/crm/pages/opportunity/index/opportunity_index",
        text: "??",
        iconPath: "/projects/crm/images/tabbar/opportunity.png",
        selectedIconPath: "/projects/crm/images/tabbar/opportunity_cur.png"
      },
      {
        pagePath: "projects/crm/pages/my/index/my_index",
        text: "??",
        iconPath: "/projects/crm/images/tabbar/my.png",
        selectedIconPath: "/projects/crm/images/tabbar/my_cur.png"
      }
    ]
  },
  
  // PLM????
  plm: {
    name: '????????',
    color: '#1890ff',
    icon: '/images/icons/plm/plm_icon.png',
    tabBar: [
      {
        pagePath: "projects/plm/pages/default/index/default_index",
        text: "???",
        iconPath: "/projects/plm/images/tabbar/home.png",
        selectedIconPath: "/projects/plm/images/tabbar/home_cur.png"
      },
      {
        pagePath: "projects/plm/pages/project/list/project_list",
        text: "??",
        iconPath: "/projects/plm/images/tabbar/project.png",
        selectedIconPath: "/projects/plm/images/tabbar/project_cur.png"
      },
      {
        pagePath: "projects/plm/pages/role/simulator/role_simulator",
        text: "????",
        iconPath: "/projects/plm/images/tabbar/role.png",
        selectedIconPath: "/projects/plm/images/tabbar/role_cur.png"
      }
    ],
    
    // #### ???????? 
    VER: 'build 2025.04.17',
    COMPANY: 'ABS',
    
    // ????
    SETUP_SHARE_TITLE: 'ABS????????',
    
    // ??????
    IMG_UPLOAD_SIZE: 10, // ??????M?  
    
    // ????
    CACHE_IS_LIST: true, // ??????
    CACHE_LIST_TIME: 60 * 30, // ???????
  
    // ????
    PROJECT_COLOR: projectSetting.PROJECT_COLOR,
    NAV_COLOR: projectSetting.NAV_COLOR,
    NAV_BG: projectSetting.NAV_BG,
    
    // ????
    USER_REG_CHECK: projectSetting.USER_REG_CHECK || false,
    USER_FIELDS: projectSetting.USER_FIELDS || [],
    
    // ???????
    NEWS_NAME: projectSetting.NEWS_NAME || '????',
    NEWS_CATE: projectSetting.NEWS_CATE || [],
    
    // ????
    SETUP_CONTENT_ITEMS: projectSetting.SETUP_CONTENT_ITEMS || [],
    
    // ??????
    FLOW_NAME: projectSetting.FLOW_NAME || '??',
    FLOW_ALL_STEPS: projectSetting.FLOW_ALL_STEPS || [],
    
    // ????
    DEPT_OPTIONS: projectSetting.DEPT_OPTIONS || []
  }
};
